#include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
typedef long long LL;

int main(int argc, char** argv) {
    int n;
    while (~scanf("%d", &n) && n!=0) {

    }
    return 0;
}
